home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 30
/
PC Gamer IT CD 30 1-2.iso
/
MOTS
/
GAMEDATA
/
RESOURCE
/
JKMRES.GOO
/
cog_actor_i2_pnch.cog
< prev
next >
Wrap
Text File
|
1998-02-25
|
3KB
|
115 lines
# Jedi Knight MOTHS Cog Script
#
# ACTOR_I2.COG
#
#
# Actor COG for Commandos with Repeaters
# Punch when their weapons get pulled
# Creates powerup upon death
#
# 7/28/97 [CR] Doubled saber damage for single player gameplay reasons
#
# [SRS]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
#
# ========================================================================================
symbols
message killed
message skill
message damaged
template powerup=+DRepeaterGun local
thing newThing local
int bin local
int senderref=-1 local
ai flee_ai=noweapon.ai local
ai punch_ai=st_punch.ai local
int damage local
vector currentpos local
end
# ========================================================================================
code
damaged:
damage = GetParam(0);
if(GetParam(1) == 16)
{
damage = (damage * 2.0);
}
ReturnEx(damage);
return;
# ........................................................................................
killed:
victim = GetSenderRef();
// If he hasn't lost his weapon already somehow.
if (GetActorWeapon(victim, 1) != -1)
{
AmputateJoint(victim, 3);
newThing = CreateThing(powerup, victim);
SetLifeleft(newThing, 200.0);
}
return;
# ........................................................................................
skill:
bin = GetParam(0);
if (bin == 24) // Force Pull
{
// he's a fighter, not a fleer... -srs
senderref = GetSenderRef();
// If he hasn't been pulled yet...
if (GetActorWeapon (senderref, 1) != -1)
{
SetActorWeapon(senderref, 1, -1);
newThing = CreateThing(powerup, GetSenderRef());
SetLifeleft(newThing, 30.0);
AISetClass (senderref, punch_ai);
AISetMode(senderref, 0x4);
ReturnEx(newThing);
}
else
{
// Give the actor a shove towards the player.
currentpos = VectorSub(GetThingPos(GetLocalPlayerThing(), senderref));
currentpos = VectorScale(VectorNorm(currentPos), 250);
ApplyForce(senderref, currentpos);
ReturnEx(-1);
}
//AIFlee(senderref, GetLocalPlayerThing());
Return;
}
else
if (bin == 31) // Force Grip
{
ReturnEx(10); // return base damage that is taken by this actor.
return;
}
else
if (bin == 34) // Deadly Sight
{
ReturnEx(5); // return base damage that is taken by this actor.
return;
}
ReturnEx(-1);
return;
end